<template>
    <img :class='{"update-data": !noIconForCol && isUpdate}' :src="iconSrc" alt="" class='icon'>
</template>
<script>
import mix from '../js/mainTable'
export default {
    mixins:[mix],
    computed: {
        iconSrc() {
            switch(this.columnInfo.dataIndex){
                case 'healthStatusType' :
                    return this.getHealthStatus();
                case 'lock.locked':
                    return this.getLockStatus();
            }
        }
    },
    methods: {
        getLockStatus() {
            switch(this.inpValue){
                case true :
                    return require('@/assets/img/planComponents/icon_lock.png')
                case false :
                    // return require('@/assets/img/planComponents/icon_unlock.png')
            }
        },
        getHealthStatus() {
            switch(this.inpValue){
                case 'GREEN' :
                    return require('@/assets/img/planComponents/icon_green.png')
                case 'RED' :
                    return require('@/assets/img/planComponents/icon_red.png')
                case 'UNAVAILABLE' :
                    return require('@/assets/img/planComponents/icon_unavailable.png')
                case 'YELLOW' :
                    return require('@/assets/img/planComponents/icon_yellow.png')
            }
        }
    }
}
</script>
<style scoped>
.icon{
    max-height: 16px
}
</style>